package LesThreads;

public class ThrAjout extends Thread {
	private int vol;
	private int delai;
	private Reserve r;

	public ThrAjout(Reserve r, int vol, int delai) {
		this.r = r;
		this.vol = vol;
		this.delai = delai;
	}
	public void run(){
		try {
			while(!interrupted()){
				r.ajoute(vol);
				sleep(delai);
			}
		} catch (InterruptedException e) {
			// TODO: handle exception
			
		}
	}

}
